home *** CD-ROM | disk | FTP | other *** search
- /* dctran.f -- translated by f2c (version of 3 February 1990 3:36:42).
- You must link the resulting object file with the libraries:
- -lF77 -lI77 -lm -lc (in that order)
- */
-
- #include "f2c.h"
-
- /* Common Block Declarations */
-
- struct {
- integer ielmnt, isbckt, nsbckt, iunsat, nunsat, itemps, numtem, isens,
- nsens, ifour, nfour, ifield, icode, idelim, icolum, insize,
- junode, lsbkpt, numbkp, iorder, jmnode, iur, iuc, ilc, ilr,
- numoff, isr, nmoffc, iseq, iseq1, neqn, nodevs, ndiag, iswap,
- iequa, macins, lvnim1, lx0, lvn, lynl, lyu, lyl, lx1, lx2, lx3,
- lx4, lx5, lx6, lx7, ld0, ld1, ltd, imynl, imvn, lcvn, nsnod,
- nsmat, nsval, icnod, icmat, icval, loutpt, lpol, lzer, irswpf,
- irswpr, icswpf, icswpr, irpt, jcpt, irowno, jcolno, nttbr, nttar,
- lvntmp;
- } tabinf_;
-
- #define tabinf_1 tabinf_
-
- struct {
- doublereal atime, aprog[3], adate, atitle[10], defl, defw, defad, defas,
- rstats[50];
- integer iwidth, lwidth, nopage;
- } miscel_;
-
- #define miscel_1 miscel_
-
- struct {
- integer locate[50], jelcnt[50], nunods, ncnods, numnod, nstop, nut, nlt,
- nxtrm, ndist, ntlin, ibr, numvs, numalt, numcyc;
- } cirdat_;
-
- #define cirdat_1 cirdat_
-
- struct {
- doublereal omega, time, delta, delold[7], ag[7], vt, xni, egfet, xmu,
- sfactr;
- integer mode, modedc, icalc, initf, method, iord, maxord, noncon, iterno,
- itemno, nosolv, modac, ipiv, ivmflg, ipostp, iscrch, iofile;
- } status_;
-
- #define status_1 status_
-
- struct {
- integer iprnta, iprntl, iprntm, iprntn, iprnto, limtim, limpts, lvlcod,
- lvltim, itl1, itl2, itl3, itl4, itl5, itl6, igoof, nogo, keof;
- } flags_;
-
- #define flags_1 flags_
-
- struct {
- doublereal tcstar[2], tcstop[2], tcincr[2];
- integer icvflg, itcelm[2], kssop, kinel, kidin, kovar, kidout;
- } dc_;
-
- #define dc_1 dc_
-
- struct {
- doublereal tstep, tstop, tstart, delmax, tdmax, forfre;
- integer jtrflg;
- } tran_;
-
- #define tran_1 tran_
-
- struct {
- integer maxtim, itime, icost;
- } cje_;
-
- #define cje_1 cje_
-
- struct {
- doublereal value[200000];
- } blank_;
-
- #define blank_1 blank_
-
- /* Table of constant values */
-
- static integer c__1 = 1;
- static integer c__0 = 0;
- static integer c_n1 = -1;
- static integer c__2 = 2;
- static integer c__7 = 7;
- static integer c__6 = 6;
-
- /* spice version 2g.6 sccsid=dctran.ma 3/15/83 */
- /*< subroutine dctran >*/
- /* Subroutine */ int dctran_()
- {
- /* Initialized data */
-
- static struct {
- char e_1[8];
- doublereal e_2;
- } equiv_93 = { {'r', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
-
- #define aletr (*(doublereal *)&equiv_93)
-
- static struct {
- char e_1[8];
- doublereal e_2;
- } equiv_94 = { {'t', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
-
- #define alett (*(doublereal *)&equiv_94)
-
- static struct {
- char e_1[24];
- doublereal e_2;
- } equiv_95 = { {'(', ' ', '(', '2', 'x', ',', 'a', '4', ',', '3', 'x',
- ',', 'a', '7', ',', '3', 'x', ')', '/', '/', ')', ' ', ' ',
- ' '}, 0. };
-
- #define avhdr ((doublereal *)&equiv_95)
-
- static struct {
- char e_1[32];
- doublereal e_2;
- } equiv_96 = { {'(', ' ', '(', '1', 'h', ' ', ',', 'a', '1', ',', 'i',
- '3', ',', '1', 'h', ')', ',', 'f', '1', '0', '.', '4', ',',
- '3', 'x', ')', '/', ')', ' ', ' ', ' ', ' '}, 0. };
-
- #define avfrm ((doublereal *)&equiv_96)
-
- static struct {
- char e_1[8];
- doublereal e_2;
- } equiv_97 = { {'n', 'o', 'd', 'e', ' ', ' ', ' ', ' '}, 0. };
-
- #define anode (*(doublereal *)&equiv_97)
-
- static struct {
- char e_1[8];
- doublereal e_2;
- } equiv_98 = { {'v', 'o', 'l', 't', 'a', 'g', 'e', ' '}, 0. };
-
- #define avltg (*(doublereal *)&equiv_98)
-
- static struct {
- char e_1[64];
- doublereal e_2;
- } equiv_99 = { {'s', 'm', 'a', 'l', 'l', ' ', 's', 'i', 'g', 'n', 'a',
- 'l', ' ', 'b', 'i', 'a', 's', ' ', 's', 'o', 'l', 'u', 't',
- 'i', 'o', 'n', ' ', ' ', ' ', ' ', ' ', ' ', 'i', 'n', 'i',
- 't', 'i', 'a', 'l', ' ', 't', 'r', 'a', 'n', 's', 'i', 'e',
- 'n', 't', ' ', 's', 'o', 'l', 'u', 't', 'i', 'o', 'n', ' ',
- ' ', ' ', ' ', ' ', ' '}, 0. };
-
- #define subtit ((doublereal *)&equiv_99)
-
- static struct {
- char e_1[4];
- integer e_2;
- } equiv_100 = { {'(', ' ', ' ', ' '}, 0 };
-
- #define lprn (*(integer *)&equiv_100)
-
- static struct {
- char e_1[8];
- doublereal e_2;
- } equiv_101 = { {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
-
- #define ablnk (*(doublereal *)&equiv_101)
-
-
- /* Format strings */
- static char fmt_26[] = "(\0020insufficient memory available for dc analy\
- sis.\002,/\002 memory required \002,i6,\002, memory available \002,i6,\002\
- .\002)";
- static char fmt_151[] = "(\0021*error*: no convergence in dc analysi\
- s\002/\0020last node vol\002,\002tages:\002/)";
- static char fmt_451[] = "(\0021*error*: no convergence in dc transfer c\
- urves at \002,a8,\002 = \002,1pd10.3/\0020last node voltages:\002/)";
- static char fmt_461[] = "(\0020*error*: cpu time limit exceeded ... ana\
- lysis stopped\002/)";
- static char fmt_463[] = "(\0020*error*: temperature sweep should be th\
- e second sweep source, change the order and re-execute\002/)";
- static char fmt_492[] = "(/,\0020*****0 return to original temperature 0\
- *****0\002,/)";
- static char fmt_901[] = "(\0021*error*: internal timestep too small in \
- transient analysis\002/)";
- static char fmt_906[] = "(\0021*error*: transient analysis iterations e\
- xceed limit of \002,i5,/\0020this limit may be overridden using the itl5 par\
- ameter on the .option card\002)";
- static char fmt_911[] = "(\0020\002,10x,\002time = \002,1pd12.5,\002; d\
- elta = \002,d12.5,\002; numnit = \002,i6/)";
- static char fmt_916[] = "(\0020\002/\0020last node voltages:\002/)";
- static char fmt_921[] = "(\0020*error*: cpu time limit exceeded in tran\
- sient analysis \002,\002at time = \002,1pd13.6/)";
-
- /* System generated locals */
- integer i_1, i_2;
- doublereal d_1, d_2;
-
- /* Builtin functions */
- integer s_wsfe(), do_fio(), e_wsfe();
-
- /* Local variables */
- static integer need;
- static doublereal anam;
- static integer loce;
- extern /* Subroutine */ int jfet_();
- static integer loco, jord, navl, locs, ipos;
- extern /* Subroutine */ int move_();
- static doublereal temp;
- static integer iptr, locv, ical2, node1, node2, node3, node4, locs2;
- extern /* Subroutine */ int getm8_(), avlm8_(), iter8_();
- static doublereal temv2;
- static integer nolx2, nolx3;
- extern /* Subroutine */ int copy8_();
- static integer i, ibuff;
- extern /* Subroutine */ int diode_();
- static integer itemp;
- extern /* Subroutine */ int title_();
- static doublereal t1;
- static integer numtp, nbkpt;
- extern /* Subroutine */ int trunc_();
- static integer numtd, lcntr, ltemp;
- static doublereal z0;
- static integer lspot;
- static doublereal t2;
- static integer icvfl1, icvfl2, irdct2, itdct2, ibkflg;
- extern /* Subroutine */ int getcje_();
- static doublereal delbkp;
- extern /* Subroutine */ int pheadr_(), comcof_();
- #define nodplc ((integer *)&blank_1)
- #define cvalue ((complex *)&blank_1)
- extern logical memptr_();
- extern /* Subroutine */ int second_();
- static integer loctim, numcur, numpos, loc, loccur, nvprln;
- extern /* Subroutine */ int alfnum_(), slpmem_(), crunch_(), sorupd_(),
- sorstp_(), bjt_(), mosfet_();
- static integer numout, irdctc, itdctc;
- static doublereal temval;
- extern /* Subroutine */ int tmpupd_(), extmem_(), fwrite_(), ptrmem_(),
- relmem_();
- static integer numese, numrtp, numnit;
- static doublereal delnew, delmin;
- static integer itrlim;
- extern /* Subroutine */ int clrmem_();
- static doublereal ordrat;
- extern /* Subroutine */ int sizmem_();
- static integer ltdsiz;
- static doublereal baktim;
- static integer nwords, ltdptr, ibr1, ibr2;
- static doublereal del1;
- extern /* Subroutine */ int clsraw_();
-
- /* Fortran I/O blocks */
- static cilist io__25 = { 0, 0, 0, fmt_26, 0 };
- static cilist io__26 = { 0, 0, 0, (char *)avhdr, 0 };
- static cilist io__28 = { 0, 0, 0, (char *)avfrm, 0 };
- static cilist io__29 = { 0, 0, 0, fmt_151, 0 };
- static cilist io__30 = { 0, 0, 0, (char *)avhdr, 0 };
- static cilist io__31 = { 0, 0, 0, (char *)avfrm, 0 };
- static cilist io__52 = { 0, 0, 0, fmt_451, 0 };
- static cilist io__53 = { 0, 0, 0, (char *)avhdr, 0 };
- static cilist io__54 = { 0, 0, 0, (char *)avfrm, 0 };
- static cilist io__55 = { 0, 0, 0, fmt_461, 0 };
- static cilist io__56 = { 0, 0, 0, fmt_463, 0 };
- static cilist io__57 = { 0, 0, 0, fmt_492, 0 };
- static cilist io__85 = { 0, 0, 0, fmt_901, 0 };
- static cilist io__86 = { 0, 0, 0, fmt_906, 0 };
- static cilist io__87 = { 0, 0, 0, fmt_911, 0 };
- static cilist io__88 = { 0, 0, 0, fmt_916, 0 };
- static cilist io__89 = { 0, 0, 0, (char *)avhdr, 0 };
- static cilist io__90 = { 0, 0, 0, (char *)avfrm, 0 };
- static cilist io__91 = { 0, 0, 0, fmt_921, 0 };
-
-
- /*< implicit double precision (a-h,o-z) >*/
-
-
- /* this routine controls the dc transfer curve, dc operating point, */
-
- /* and transient analyses. the variables mode and modedc (defined below)
- */
- /* determine exactly which analysis is performed. */
-
- /* spice version 2g.6 sccsid=tabinf 3/15/83 */
- /*< common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem, >*/
- /*< 1 isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize, >*/
- /*< 2 junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr, >*/
- /*< 3 nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1, >*/
- /*< 4 lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd, >*/
- /*< 5 imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval, >*/
- /*< 6 loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt, >*/
- /*< 7 irowno,jcolno,nttbr,nttar,lvntmp >*/
- /* spice version 2g.6 sccsid=miscel 3/15/83 */
- /*< common /miscel/ atime,aprog(3),adate,atitle(10),defl,defw,defad, >*/
- /*< 1 defas,rstats(50),iwidth,lwidth,nopage >*/
- /* spice version 2g.6 sccsid=cirdat 3/15/83 */
- /*< common /cirdat/ locate(50),jelcnt(50),nunods,ncnods,numnod,nstop, >*/
- /*< 1 nut,nlt,nxtrm,ndist,ntlin,ibr,numvs,numalt,numcyc >*/
- /* spice version 2g.6 sccsid=status 3/15/83 */
- /*< common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, >*/
- /*< 1 xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, >*/
- /*< 2 iterno,itemno,nosolv,modac,ipiv,ivmflg,ipostp,iscrch,iofile >*/
- /* spice version 2g.6 sccsid=flags 3/15/83 */
- /*< common /flags/ iprnta,iprntl,iprntm,iprntn,iprnto,limtim,limpts, >*/
- /*< 1 lvlcod,lvltim,itl1,itl2,itl3,itl4,itl5,itl6,igoof,nogo,keof >*/
- /* spice version 2g.6 sccsid=dc 3/15/83 */
- /*< common /dc/ tcstar(2),tcstop(2),tcincr(2),icvflg,itcelm(2),kssop, >*/
- /*< 1 kinel,kidin,kovar,kidout >*/
- /* spice version 2g.6 sccsid=tran 3/15/83 */
- /*< common /tran/ tstep,tstop,tstart,delmax,tdmax,forfre,jtrflg >*/
- /* spice version 2g.6 sccsid=cje 3/15/83 */
- /*< common /cje/ maxtim,itime,icost >*/
- /* spice version 2g.6 sccsid=blank 3/15/83 */
- /*< common /blank/ value(200000) >*/
- /*< integer nodplc(64) >*/
- /*< complex cvalue(32) >*/
- /*< equivalence (value(1),nodplc(1),cvalue(1)) >*/
- /*< logical memptr >*/
-
-
- /*< dimension subtit(4,2) >*/
- /*< dimension avhdr(3),avfrm(4) >*/
- /*< data avhdr / 8h( (2x,a4, 8h,3x,a7,3, 5hx)//) / >*/
- /*< data avfrm / 8h( (1h ,a, 8h1,i3,1h), 8h,f10.4,3, 4hx)/) / >*/
- /*< data anode, avltg / 4hnode, 7hvoltage / >*/
- /*< data subtit / 8hsmall si, 8hgnal bia, 8hs soluti, 8hon , >*/
- /*< 1 8hinitial , 8htransien, 8ht soluti, 8hon / >*/
- /*< data lprn /1h(/ >*/
- /*< data ablnk, aletr, alett /1h , 1hr, 1ht / >*/
-
- /* the variables *mode*, *modedc*, and *initf* are used by spice to
- */
- /* keep track of the state of the analysis. the values of these flags */
- /* (and the corresponding meanings) are as follows: */
-
- /* flag value meaning */
- /* ---- ----- ------- */
-
- /* mode 1 dc analysis (subtype defined by *modedc*) */
- /* 2 transient analysis */
- /* 3 ac analysis (small signal) */
-
- /* modedc 1 dc operating point */
- /* 2 initial operating point for transient analysis
- */
- /* 3 dc transfer curve computation */
-
- /* initf 1 converge with 'off' devices allowed to float */
-
- /* 2 initialize junction voltages */
- /* 3 converge with 'off' devices held 'off' */
- /* 4 store small-signal parameters away */
- /* 5 first timepoint in transient analysis */
- /* 6 prediction step */
-
- /* note: *modedc* is only significant if *mode* = 1. */
-
-
- /* initialize */
-
- /*< call second(t1) >*/
- second_(&t1);
- /*< sfactr=1.0d0 >*/
- status_1.sfactr = 1.;
- /* .. don't take any chances with lx3, set to large number */
- /*< lx3=20000000 >*/
- tabinf_1.lx3 = 20000000;
- /*< lx2=20000000 >*/
- tabinf_1.lx2 = 20000000;
- /* .. see if lx3 and lx2 tables are needed */
- /*< nolx2=0 >*/
- nolx2 = 0;
- /*< nolx3=0 >*/
- nolx3 = 0;
- /*< 20 loctim=5 >*/
- /* L20: */
- loctim = 5;
-
- /* .. post-processing initialization */
-
- /*< if(ipostp.eq.0) go to 25 >*/
- if (status_1.ipostp == 0) {
- goto L25;
- }
- /*< numcur=jelcnt(9) >*/
- numcur = cirdat_1.jelcnt[8];
- /*< numpos=nunods+numcur >*/
- numpos = cirdat_1.nunods + numcur;
- /*< call getm8(ibuff,numpos) >*/
- getm8_(&ibuff, &numpos);
- /*< numpos=numpos*4 >*/
- numpos <<= 2;
- /*< if(numcur.eq.0) go to 25 >*/
- if (numcur == 0) {
- goto L25;
- }
- /*< loc=locate(9) >*/
- loc = cirdat_1.locate[8];
- /*< loccur=nodplc(loc+6)-1 >*/
- loccur = nodplc[loc + 5] - 1;
-
- /* ... set up format */
-
- /*< 25 nvprln=4+(lwidth-72)/19 >*/
- L25:
- nvprln = (miscel_1.lwidth - 72) / 19 + 4;
- /*< nvprln=min0(nvprln,ncnods-1) >*/
- /* Computing MAX */
- i_1 = nvprln, i_2 = cirdat_1.ncnods - 1;
- nvprln = min(i_2,i_1);
- /*< ipos=2 >*/
- ipos = 2;
- /*< call alfnum(nvprln,avfrm,ipos) >*/
- alfnum_(&nvprln, avfrm, &ipos);
- /*< ipos=2 >*/
- ipos = 2;
- /*< call alfnum(nvprln,avhdr,ipos) >*/
- alfnum_(&nvprln, avhdr, &ipos);
- /* ... allocate storage */
- /*< if (mode.eq.2) go to 35 >*/
- if (status_1.mode == 2) {
- goto L35;
- }
- /*< need=4*nstop+nttbr+nxtrm >*/
- need = (cirdat_1.nstop << 2) + tabinf_1.nttbr + cirdat_1.nxtrm;
- /*< call avlm8(navl) >*/
- avlm8_(&navl);
- /*< if(need.le.navl) go to 30 >*/
- if (need <= navl) {
- goto L30;
- }
- /* ... not enough memory for dc operating point analysis */
- /*< write(iofile,26) need,navl >*/
- io__25.ciunit = status_1.iofile;
- s_wsfe(&io__25);
- do_fio(&c__1, (char *)&need, (ftnlen)sizeof(integer));
- do_fio(&c__1, (char *)&navl, (ftnlen)sizeof(integer));
- e_wsfe();
- /*< 26 format('0insufficient memory available for dc analysis.',/ >*/
- /*< 1' memory required ',i6,', memory available ',i6,'.') >*/
- /*< nogo=1 >*/
- flags_1.nogo = 1;
- /*< go to 1100 >*/
- goto L1100;
- /*< 30 call getm8(lvnim1,nstop) >*/
- L30:
- getm8_(&tabinf_1.lvnim1, &cirdat_1.nstop);
- /*< call getm8(lvn,nstop+nttbr) >*/
- i_1 = cirdat_1.nstop + tabinf_1.nttbr;
- getm8_(&tabinf_1.lvn, &i_1);
- /*< call slpmem(lvn,nstop) >*/
- slpmem_(&tabinf_1.lvn, &cirdat_1.nstop);
- /*< call getm8(lx0,nxtrm) >*/
- getm8_(&tabinf_1.lx0, &cirdat_1.nxtrm);
- /*< call getm8(lvntmp,nstop) >*/
- getm8_(&tabinf_1.lvntmp, &cirdat_1.nstop);
- /*< if (modedc.ne.3) go to 45 >*/
- if (status_1.modedc != 3) {
- goto L45;
- }
- /*< 35 call getm8(lx1,nxtrm) >*/
- L35:
- getm8_(&tabinf_1.lx1, &cirdat_1.nxtrm);
- /*< if(nolx2.eq.0) call getm8(lx2,nxtrm) >*/
- if (nolx2 == 0) {
- getm8_(&tabinf_1.lx2, &cirdat_1.nxtrm);
- }
- /*< if (mode.ne.2) go to 40 >*/
- if (status_1.mode != 2) {
- goto L40;
- }
- /*< if(nolx3.eq.0) call getm8(lx3,nxtrm) >*/
- if (nolx3 == 0) {
- getm8_(&tabinf_1.lx3, &cirdat_1.nxtrm);
- }
- /*< call getm8(ltd,0) >*/
- getm8_(&tabinf_1.ltd, &c__0);
- /*< 40 call getm8(loutpt,0) >*/
- L40:
- getm8_(&tabinf_1.loutpt, &c__0);
- /*< 45 call crunch >*/
- L45:
- crunch_();
- /*< 50 if (mode.eq.2) go to 500 >*/
- /* L50: */
- if (status_1.mode == 2) {
- goto L500;
- }
- /*< time=0.0d0 >*/
- status_1.time = 0.;
- /*< ag(1)=0.0d0 >*/
- status_1.ag[0] = 0.;
- /*< call sorupd >*/
- sorupd_();
- /*< if (modedc.eq.3) go to 300 >*/
- if (status_1.modedc == 3) {
- goto L300;
- }
-
-
- /* .... single point dc analysis */
-
-
- /* compute dc operating point */
-
- /*< 100 if (itl6.gt.0) go to 105 >*/
- /* L100: */
- if (flags_1.itl6 > 0) {
- goto L105;
- }
- /*< initf=2 >*/
- status_1.initf = 2;
- /*< call iter8(itl1) >*/
- iter8_(&flags_1.itl1);
- /*< rstats(6)=rstats(6)+iterno >*/
- miscel_1.rstats[5] += status_1.iterno;
- /*< if (igoof.ne.0) go to 150 >*/
- if (flags_1.igoof != 0) {
- goto L150;
- }
- /*< go to 110 >*/
- goto L110;
- /*< 105 call sorstp(itl6) >*/
- L105:
- sorstp_(&flags_1.itl6);
- /*< rstats(6)=rstats(6)+iterno >*/
- miscel_1.rstats[5] += status_1.iterno;
- /*< if (igoof.ne.0) go to 150 >*/
- if (flags_1.igoof != 0) {
- goto L150;
- }
- /*< 110 if (modedc.ne.1) go to 120 >*/
- L110:
- if (status_1.modedc != 1) {
- goto L120;
- }
- /*< initf=4 >*/
- status_1.initf = 4;
- /*< call diode >*/
- diode_();
- /*< call bjt >*/
- bjt_();
- /*< call jfet >*/
- jfet_();
- /*< call mosfet >*/
- mosfet_();
-
- /* print operating point */
-
- /*< 120 if ((mode.eq.1).and.(modedc.eq.2).and.(nosolv.ne.0)) go to 1000 >*/
- L120:
- if (status_1.mode == 1 && status_1.modedc == 2 && status_1.nosolv != 0) {
- goto L1000;
- }
- /*< call title(-1,lwidth,1,subtit(1,modedc)) >*/
- title_(&c_n1, &miscel_1.lwidth, &c__1, &subtit[(status_1.modedc << 2) - 4]
- );
- /*< write (iofile,avhdr) (anode,avltg,i=1,nvprln) >*/
- io__26.ciunit = status_1.iofile;
- s_wsfe(&io__26);
- i_1 = nvprln;
- for (i = 1; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&anode, (ftnlen)sizeof(doublereal));
- do_fio(&c__1, (char *)&avltg, (ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< write (iofile,avfrm) (lprn,nodplc(junode+i),value(lvnim1+i), >*/
- /*< 1 i=2,ncnods) >*/
- io__28.ciunit = status_1.iofile;
- s_wsfe(&io__28);
- i_1 = cirdat_1.ncnods;
- for (i = 2; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&lprn, (ftnlen)sizeof(integer));
- do_fio(&c__1, (char *)&nodplc[tabinf_1.junode + i - 1], (ftnlen)
- sizeof(integer));
- do_fio(&c__1, (char *)&blank_1.value[tabinf_1.lvnim1 + i - 1], (
- ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< go to 1000 >*/
- goto L1000;
-
- /* no convergence */
-
- /*< 150 nogo=1 >*/
- L150:
- flags_1.nogo = 1;
- /*< write (iofile,151) >*/
- io__29.ciunit = status_1.iofile;
- s_wsfe(&io__29);
- e_wsfe();
- /*< 151 format('1*error*: no convergence in dc analysis'/'0last node vol' >*/
- /*< 1 ,'tages:'/) >*/
- /*< write (iofile,avhdr) (anode,avltg,i=1,nvprln) >*/
- io__30.ciunit = status_1.iofile;
- s_wsfe(&io__30);
- i_1 = nvprln;
- for (i = 1; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&anode, (ftnlen)sizeof(doublereal));
- do_fio(&c__1, (char *)&avltg, (ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< write (iofile,avfrm) (lprn,nodplc(junode+i),value(lvnim1+i), >*/
- /*< 1 i=2,ncnods) >*/
- io__31.ciunit = status_1.iofile;
- s_wsfe(&io__31);
- i_1 = cirdat_1.ncnods;
- for (i = 2; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&lprn, (ftnlen)sizeof(integer));
- do_fio(&c__1, (char *)&nodplc[tabinf_1.junode + i - 1], (ftnlen)
- sizeof(integer));
- do_fio(&c__1, (char *)&blank_1.value[tabinf_1.lvnim1 + i - 1], (
- ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< go to 1000 >*/
- goto L1000;
-
- /* .... dc transfer curves */
-
- /*< 300 numout=jelcnt(41)+1 >*/
- L300:
- numout = cirdat_1.jelcnt[40] + 1;
- /*< if(ipostp.ne.0) call pheadr(atitle) >*/
- if (status_1.ipostp != 0) {
- pheadr_(miscel_1.atitle);
- }
- /*< itemp=itcelm(1) >*/
- itemp = dc_1.itcelm[0];
- /*< locs=nodplc(itemp+1) >*/
- locs = nodplc[itemp];
- /*< anam=value(locs) >*/
- anam = blank_1.value[locs - 1];
- /*< call move(anam,2,ablnk,1,7) >*/
- move_(&anam, &c__2, &ablnk, &c__1, &c__7);
- /*< irdctc=0 >*/
- irdctc = 0;
- /*< irdct2=0 >*/
- irdct2 = 0;
- /*< itdctc=0 >*/
- itdctc = 0;
- /*< itdct2=0 >*/
- itdct2 = 0;
- /*< if (anam.eq.aletr) irdctc=1 >*/
- if (anam == aletr) {
- irdctc = 1;
- }
- /*< if (anam.eq.alett) itdctc=1 >*/
- if (anam == alett) {
- itdctc = 1;
- }
- /*< temval=value(locs+1) >*/
- temval = blank_1.value[locs];
- /*< icvfl2=1 >*/
- icvfl2 = 1;
- /*< if(itcelm(2).eq.0) go to 310 >*/
- if (dc_1.itcelm[1] == 0) {
- goto L310;
- }
- /*< itemp=itcelm(2) >*/
- itemp = dc_1.itcelm[1];
- /*< locs2=nodplc(itemp+1) >*/
- locs2 = nodplc[itemp];
- /*< anam=value(locs2) >*/
- anam = blank_1.value[locs2 - 1];
- /*< call move(anam,2,ablnk,1,7) >*/
- move_(&anam, &c__2, &ablnk, &c__1, &c__7);
- /*< if (anam.eq.aletr) irdct2=1 >*/
- if (anam == aletr) {
- irdct2 = 1;
- }
- /*< if (anam.eq.alett) itdct2=1 >*/
- if (anam == alett) {
- itdct2 = 1;
- }
- /*< temv2=value(locs2+1) >*/
- temv2 = blank_1.value[locs2];
- /*< value(locs2+1)=tcstar(2) >*/
- blank_1.value[locs2] = dc_1.tcstar[1];
- /*< temp=dabs((tcstop(2)-tcstar(2))/tcincr(2))+0.5d0 >*/
- temp = (d_1 = (dc_1.tcstop[1] - dc_1.tcstar[1]) / dc_1.tcincr[1], abs(d_1)
- ) + .5;
- /*< icvfl2=idint(temp)+1 >*/
- icvfl2 = (integer) temp + 1;
- /*< icvfl2=max0(icvfl2,1) >*/
- icvfl2 = max(icvfl2,1);
- /*< 310 delta=tcincr(1) >*/
- L310:
- status_1.delta = dc_1.tcincr[0];
- /*< do 320 i=1,7 >*/
- for (i = 1; i <= 7; ++i) {
- /*< delold(i)=delta >*/
- status_1.delold[i - 1] = status_1.delta;
- /*< 320 continue >*/
- /* L320: */
- }
- /*< icvfl1=icvflg/icvfl2 >*/
- icvfl1 = dc_1.icvflg / icvfl2;
- /*< value(locs+1)=tcstar(1) >*/
- blank_1.value[locs] = dc_1.tcstar[0];
- /*< if ((itdctc.ne.1).and.(itdct2.ne.1)) go to 325 >*/
- if (itdctc != 1 && itdct2 != 1) {
- goto L325;
- }
- /*< itemno=3 >*/
- status_1.itemno = 3;
- /*< if (itdctc.eq.1) value(itemps+itemno)=value(locs+1) >*/
- if (itdctc == 1) {
- blank_1.value[tabinf_1.itemps + status_1.itemno - 1] = blank_1.value[
- locs];
- }
- /*< if (itdct2.eq.1) value(itemps+itemno)=value(locs2+1) >*/
- if (itdct2 == 1) {
- blank_1.value[tabinf_1.itemps + status_1.itemno - 1] = blank_1.value[
- locs2];
- }
- /*< call tmpupd >*/
- tmpupd_();
- /*< 325 if (irdctc.eq.1) value(locs+1)=1.0d0/value(locs+1) >*/
- L325:
- if (irdctc == 1) {
- blank_1.value[locs] = 1. / blank_1.value[locs];
- }
- /*< if (irdct2.eq.1) value(locs2+1)=1.0d0/value(locs2+1) >*/
- if (irdct2 == 1) {
- blank_1.value[locs2] = 1. / blank_1.value[locs2];
- }
- /*< icalc=0 >*/
- status_1.icalc = 0;
- /*< ical2=0 >*/
- ical2 = 0;
- /*< loctim=3 >*/
- loctim = 3;
- /*< 340 initf=2 >*/
- L340:
- status_1.initf = 2;
- /*< call iter8(itl1) >*/
- iter8_(&flags_1.itl1);
- /*< rstats(4)=rstats(4)+iterno >*/
- miscel_1.rstats[3] += status_1.iterno;
- /*< call copy8(value(lx0+1),value(lx1+1),nxtrm) >*/
- copy8_(&blank_1.value[tabinf_1.lx0], &blank_1.value[tabinf_1.lx1], &
- cirdat_1.nxtrm);
- /*< if(nolx2.eq.0) call copy8(value(lx0+1),value(lx2+1),nxtrm) >*/
- if (nolx2 == 0) {
- copy8_(&blank_1.value[tabinf_1.lx0], &blank_1.value[tabinf_1.lx2], &
- cirdat_1.nxtrm);
- }
- /*< if (igoof.ne.0) go to 450 >*/
- if (flags_1.igoof != 0) {
- goto L450;
- }
- /*< go to 360 >*/
- goto L360;
- /*< 350 call getcje >*/
- L350:
- getcje_();
- /*< if ((maxtim-itime).le.limtim) go to 460 >*/
- if (cje_1.maxtim - cje_1.itime <= flags_1.limtim) {
- goto L460;
- }
- /*< initf=6 >*/
- status_1.initf = 6;
- /*< call iter8(itl2) >*/
- iter8_(&flags_1.itl2);
- /*< rstats(4)=rstats(4)+iterno >*/
- miscel_1.rstats[3] += status_1.iterno;
- /*< if (igoof.ne.0) go to 340 >*/
- if (flags_1.igoof != 0) {
- goto L340;
- }
-
- /* store outputs */
-
- /*< 360 call extmem(loutpt,numout) >*/
- L360:
- extmem_(&tabinf_1.loutpt, &numout);
- /*< loco=loutpt+icalc*numout >*/
- loco = tabinf_1.loutpt + status_1.icalc * numout;
- /*< icalc=icalc+1 >*/
- ++status_1.icalc;
- /*< ical2=ical2+1 >*/
- ++ical2;
- /*< value(loco+1)=value(locs+1) >*/
- blank_1.value[loco] = blank_1.value[locs];
- /*< if (irdctc.eq.1) value(loco+1)=1.0d0/value(loco+1) >*/
- if (irdctc == 1) {
- blank_1.value[loco] = 1. / blank_1.value[loco];
- }
- /*< loc=locate(41) >*/
- loc = cirdat_1.locate[40];
- /*< 370 if (loc.eq.0) go to 400 >*/
- L370:
- if (loc == 0) {
- goto L400;
- }
- /*< if (nodplc(loc+5).ne.0) go to 380 >*/
- if (nodplc[loc + 4] != 0) {
- goto L380;
- }
- /*< node1=nodplc(loc+2) >*/
- node1 = nodplc[loc + 1];
- /*< node2=nodplc(loc+3) >*/
- node2 = nodplc[loc + 2];
- /*< iseq=nodplc(loc+4) >*/
- tabinf_1.iseq = nodplc[loc + 3];
- /*< value(loco+iseq)=value(lvnim1+node1)-value(lvnim1+node2) >*/
- blank_1.value[loco + tabinf_1.iseq - 1] = blank_1.value[tabinf_1.lvnim1 +
- node1 - 1] - blank_1.value[tabinf_1.lvnim1 + node2 - 1];
- /*< loc=nodplc(loc) >*/
- loc = nodplc[loc - 1];
- /*< go to 370 >*/
- goto L370;
- /*< 380 iptr=nodplc(loc+2) >*/
- L380:
- iptr = nodplc[loc + 1];
- /*< iptr=nodplc(iptr+6) >*/
- iptr = nodplc[iptr + 5];
- /*< iseq=nodplc(loc+4) >*/
- tabinf_1.iseq = nodplc[loc + 3];
- /*< value(loco+iseq)=value(lvnim1+iptr) >*/
- blank_1.value[loco + tabinf_1.iseq - 1] = blank_1.value[tabinf_1.lvnim1 +
- iptr - 1];
- /*< loc=nodplc(loc) >*/
- loc = nodplc[loc - 1];
- /*< go to 370 >*/
- goto L370;
-
- /* increment source value */
-
- /*< 400 if(ipostp.eq.0) go to 410 >*/
- L400:
- if (status_1.ipostp == 0) {
- goto L410;
- }
- /*< value(ibuff+1)=value(locs+1) >*/
- blank_1.value[ibuff] = blank_1.value[locs];
- /*< call copy8(value(lvnim1+2),value(ibuff+2),nunods-1) >*/
- i_1 = cirdat_1.nunods - 1;
- copy8_(&blank_1.value[tabinf_1.lvnim1 + 1], &blank_1.value[ibuff + 1], &
- i_1);
- /*< if(numcur.ne.0) call copy8(value(lvnim1+loccur+1), >*/
- /*< 1 value(ibuff+nunods+1),numcur) >*/
- if (numcur != 0) {
- copy8_(&blank_1.value[tabinf_1.lvnim1 + loccur], &blank_1.value[ibuff
- + cirdat_1.nunods], &numcur);
- }
- /*< call fwrite(value(ibuff+1),numpos) >*/
- fwrite_(&blank_1.value[ibuff], &numpos);
- /*< 410 if (icalc.ge.icvflg) go to 490 >*/
- L410:
- if (status_1.icalc >= dc_1.icvflg) {
- goto L490;
- }
- /*< if(ical2.ge.icvfl1) go to 480 >*/
- if (ical2 >= icvfl1) {
- goto L480;
- }
- /*< if(nolx2.ne.0) go to 420 >*/
- if (nolx2 != 0) {
- goto L420;
- }
- /*< call ptrmem(lx2,itemp) >*/
- ptrmem_(&tabinf_1.lx2, &itemp);
- /*< call ptrmem(lx1,lx2) >*/
- ptrmem_(&tabinf_1.lx1, &tabinf_1.lx2);
- /*< go to 430 >*/
- goto L430;
- /*< 420 call ptrmem(lx1,itemp) >*/
- L420:
- ptrmem_(&tabinf_1.lx1, &itemp);
- /*< 430 call ptrmem(lx0,lx1) >*/
- L430:
- ptrmem_(&tabinf_1.lx0, &tabinf_1.lx1);
- /*< call ptrmem(itemp,lx0) >*/
- ptrmem_(&itemp, &tabinf_1.lx0);
- /*< value(locs+1)=tcstar(1)+dble(ical2)*delta >*/
- blank_1.value[locs] = dc_1.tcstar[0] + (doublereal) ical2 *
- status_1.delta;
- /*< if (itdctc.ne.1) go to 440 >*/
- if (itdctc != 1) {
- goto L440;
- }
- /*< value(itemps+itemno-1)=value(itemps+itemno) >*/
- blank_1.value[tabinf_1.itemps + status_1.itemno - 2] = blank_1.value[
- tabinf_1.itemps + status_1.itemno - 1];
- /*< value(itemps+itemno)=value(locs+1) >*/
- blank_1.value[tabinf_1.itemps + status_1.itemno - 1] = blank_1.value[locs]
- ;
- /*< call tmpupd >*/
- tmpupd_();
- /*< 440 if (irdctc.eq.1) value(locs+1)=1.0d0/value(locs+1) >*/
- L440:
- if (irdctc == 1) {
- blank_1.value[locs] = 1. / blank_1.value[locs];
- }
- /*< go to 350 >*/
- goto L350;
-
- /* no convergence */
-
- /*< 450 itemp=itcelm(1) >*/
- L450:
- itemp = dc_1.itcelm[0];
- /*< loce=nodplc(itemp+1) >*/
- loce = nodplc[itemp];
- /*< write (iofile,451) value(loce),value(locs+1) >*/
- io__52.ciunit = status_1.iofile;
- s_wsfe(&io__52);
- do_fio(&c__1, (char *)&blank_1.value[loce - 1], (ftnlen)sizeof(doublereal)
- );
- do_fio(&c__1, (char *)&blank_1.value[locs], (ftnlen)sizeof(doublereal));
- e_wsfe();
- /*< 451 format('1*error*: no convergence in dc transfer curves at ',a8, >*/
- /*< 1 ' = ',1pd10.3/'0last node voltages:'/) >*/
- /*< write (iofile,avhdr) (anode,avltg,i=1,nvprln) >*/
- io__53.ciunit = status_1.iofile;
- s_wsfe(&io__53);
- i_1 = nvprln;
- for (i = 1; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&anode, (ftnlen)sizeof(doublereal));
- do_fio(&c__1, (char *)&avltg, (ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< write (iofile,avfrm) (lprn,nodplc(junode+i),value(lvnim1+i), >*/
- /*< 1 i=2,ncnods) >*/
- io__54.ciunit = status_1.iofile;
- s_wsfe(&io__54);
- i_1 = cirdat_1.ncnods;
- for (i = 2; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&lprn, (ftnlen)sizeof(integer));
- do_fio(&c__1, (char *)&nodplc[tabinf_1.junode + i - 1], (ftnlen)
- sizeof(integer));
- do_fio(&c__1, (char *)&blank_1.value[tabinf_1.lvnim1 + i - 1], (
- ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< go to 470 >*/
- goto L470;
- /*< 460 write (iofile,461) >*/
- L460:
- io__55.ciunit = status_1.iofile;
- s_wsfe(&io__55);
- e_wsfe();
- /*< 461 format('0*error*: cpu time limit exceeded ... analysis stopped'/) >*/
- /*< go to 470 >*/
- goto L470;
- /*< 462 write(iofile,463) >*/
- L462:
- io__56.ciunit = status_1.iofile;
- s_wsfe(&io__56);
- e_wsfe();
- /*< 463 format('0*error*: temperature sweep should be the second sweep >*/
- /*< 1source, change the order and re-execute'/) >*/
- /*< 470 nogo=1 >*/
- L470:
- flags_1.nogo = 1;
- /*< go to 490 >*/
- goto L490;
- /* ... reset first sweep variable ... step second */
- /*< 480 ical2=0 >*/
- L480:
- ical2 = 0;
- /*< value(locs+1)=tcstar(1) >*/
- blank_1.value[locs] = dc_1.tcstar[0];
- /*< if (irdctc.eq.1) value(locs+1)=1.0d0/value(locs+1) >*/
- if (irdctc == 1) {
- blank_1.value[locs] = 1. / blank_1.value[locs];
- }
- /*< if (itdctc.eq.1) go to 462 >*/
- if (itdctc == 1) {
- goto L462;
- }
- /*< value(locs2+1)=value(locs2+1)+tcincr(2) >*/
- blank_1.value[locs2] += dc_1.tcincr[1];
- /*< if (irdct2.eq.1) value(locs2+1)=1.0d0/value(locs2+1) >*/
- if (irdct2 == 1) {
- blank_1.value[locs2] = 1. / blank_1.value[locs2];
- }
- /*< if (itdct2.ne.1) go to 340 >*/
- if (itdct2 != 1) {
- goto L340;
- }
- /*< value(itemps+itemno-1)=value(itemps+itemno) >*/
- blank_1.value[tabinf_1.itemps + status_1.itemno - 2] = blank_1.value[
- tabinf_1.itemps + status_1.itemno - 1];
- /*< value(itemps+itemno)=value(locs2+1) >*/
- blank_1.value[tabinf_1.itemps + status_1.itemno - 1] = blank_1.value[
- locs2];
- /*< call tmpupd >*/
- tmpupd_();
- /*< go to 340 >*/
- goto L340;
-
- /* finished with dc transfer curves */
-
- /*< 490 value(locs+1)=temval >*/
- L490:
- blank_1.value[locs] = temval;
- /*< if(itcelm(2).ne.0) value(locs2+1)=temv2 >*/
- if (dc_1.itcelm[1] != 0) {
- blank_1.value[locs2] = temv2;
- }
- /*< if ((itdctc.eq.0).and.(itdct2.eq.0)) go to 1000 >*/
- if (itdctc == 0 && itdct2 == 0) {
- goto L1000;
- }
- /*< value(itemps+itemno-1)=value(itemps+itemno) >*/
- blank_1.value[tabinf_1.itemps + status_1.itemno - 2] = blank_1.value[
- tabinf_1.itemps + status_1.itemno - 1];
- /*< if (itdctc.eq.1) value(itemps+itemno)=temval >*/
- if (itdctc == 1) {
- blank_1.value[tabinf_1.itemps + status_1.itemno - 1] = temval;
- }
- /*< if (itdct2.eq.1) value(itemps+itemno)=temv2 >*/
- if (itdct2 == 1) {
- blank_1.value[tabinf_1.itemps + status_1.itemno - 1] = temv2;
- }
- /*< write (iofile,492) >*/
- io__57.ciunit = status_1.iofile;
- s_wsfe(&io__57);
- e_wsfe();
- /*< 492 format (/,'0*****0 return to original temperature 0*****0',/) >*/
- /*< call tmpupd >*/
- tmpupd_();
- /*< itemno=1 >*/
- status_1.itemno = 1;
- /*< call relmem(itemps,2) >*/
- relmem_(&tabinf_1.itemps, &c__2);
- /*< if(ipostp.eq.0) go to 1000 >*/
- if (status_1.ipostp == 0) {
- goto L1000;
- }
- /*< call fwrite(value(ibuff+1),numpos) >*/
- fwrite_(&blank_1.value[ibuff], &numpos);
- /*< go to 1000 >*/
- goto L1000;
-
- /* .... transient analysis */
-
- /*< 500 numout=jelcnt(42)+1 >*/
- L500:
- numout = cirdat_1.jelcnt[41] + 1;
- /*< if(ipostp.ne.0) call pheadr(atitle) >*/
- if (status_1.ipostp != 0) {
- pheadr_(miscel_1.atitle);
- }
- /* ... limit delmax if no energy-storage elements */
- /*< numese=jelcnt(2)+jelcnt(3)+jelcnt(11)+jelcnt(12)+jelcnt(13) >*/
- /*< 1 +jelcnt(14) >*/
- numese = cirdat_1.jelcnt[1] + cirdat_1.jelcnt[2] + cirdat_1.jelcnt[10] +
- cirdat_1.jelcnt[11] + cirdat_1.jelcnt[12] + cirdat_1.jelcnt[13];
- /*< if (numese.eq.0) delmax=dmin1(delmax,tstep) >*/
- if (numese == 0) {
- tran_1.delmax = min(tran_1.delmax,tran_1.tstep);
- }
- /*< initf=5 >*/
- status_1.initf = 5;
- /*< iord=1 >*/
- status_1.iord = 1;
- /*< loctim=9 >*/
- loctim = 9;
- /*< icalc=0 >*/
- status_1.icalc = 0;
- /*< numtp=0 >*/
- numtp = 0;
- /*< numrtp=0 >*/
- numrtp = 0;
- /*< numnit=0 >*/
- numnit = 0;
- /*< time=0.0d0 >*/
- status_1.time = 0.;
- /*< ibkflg=1 >*/
- ibkflg = 1;
- /*< delbkp=delmax >*/
- delbkp = tran_1.delmax;
- /*< nbkpt=1 >*/
- nbkpt = 1;
- /*< delta=delmax >*/
- status_1.delta = tran_1.delmax;
- /*< do 510 i=1,7 >*/
- for (i = 1; i <= 7; ++i) {
- /*< delold(i)=delta >*/
- status_1.delold[i - 1] = status_1.delta;
- /*< 510 continue >*/
- /* L510: */
- }
- /*< delnew=delta >*/
- delnew = status_1.delta;
- /*< delmin=1.0d-9*delmax >*/
- delmin = tran_1.delmax * 1e-9;
- /*< go to 650 >*/
- goto L650;
-
- /* increment time, update sources, and solve next timepoint */
-
- /*< 600 time=time+delta >*/
- L600:
- status_1.time += status_1.delta;
- /*< call sorupd >*/
- sorupd_();
- /*< if (nogo.ne.0) go to 950 >*/
- if (flags_1.nogo != 0) {
- goto L950;
- }
- /*< call getcje >*/
- getcje_();
- /*< if ((maxtim-itime).le.limtim) go to 920 >*/
- if (cje_1.maxtim - cje_1.itime <= flags_1.limtim) {
- goto L920;
- }
- /*< if ((itl5.ne.0).and.(numnit.ge.itl5)) go to 905 >*/
- if (flags_1.itl5 != 0 && numnit >= flags_1.itl5) {
- goto L905;
- }
- /*< call comcof >*/
- comcof_();
- /*< if (initf.ne.5) initf=6 >*/
- if (status_1.initf != 5) {
- status_1.initf = 6;
- }
- /*< itrlim=itl4 >*/
- itrlim = flags_1.itl4;
- /*< if ((numtp.eq.0).and.(nosolv.ne.0)) itrlim=itl1 >*/
- if (numtp == 0 && status_1.nosolv != 0) {
- itrlim = flags_1.itl1;
- }
- /*< call iter8(itrlim) >*/
- iter8_(&itrlim);
- /*< numnit=numnit+iterno >*/
- numnit += status_1.iterno;
- /*< numtp=numtp+1 >*/
- ++numtp;
- /*< if (numtp.ne.1) go to 605 >*/
- if (numtp != 1) {
- goto L605;
- }
- /*< if(nolx2.eq.0) call copy8(value(lx1+1),value(lx2+1),nxtrm) >*/
- if (nolx2 == 0) {
- copy8_(&blank_1.value[tabinf_1.lx1], &blank_1.value[tabinf_1.lx2], &
- cirdat_1.nxtrm);
- }
- /*< if(nolx3.eq.0) call copy8(value(lx1+1),value(lx3+1),nxtrm) >*/
- if (nolx3 == 0) {
- copy8_(&blank_1.value[tabinf_1.lx1], &blank_1.value[tabinf_1.lx3], &
- cirdat_1.nxtrm);
- }
- /* .. note that time-point is cut when itrlim exceeded regardless */
- /* .. of which time-step contol is specified thru 'lvltim'. */
- /*< 605 if (igoof.eq.0) go to 610 >*/
- L605:
- if (flags_1.igoof == 0) {
- goto L610;
- }
- /*< jord=iord >*/
- jord = status_1.iord;
- /*< iord=1 >*/
- status_1.iord = 1;
- /*< if (jord.ge.5) call clrmem(lx7) >*/
- if (jord >= 5) {
- clrmem_(&tabinf_1.lx7);
- }
- /*< if (jord.ge.4) call clrmem(lx6) >*/
- if (jord >= 4) {
- clrmem_(&tabinf_1.lx6);
- }
- /*< if (jord.ge.3) call clrmem(lx5) >*/
- if (jord >= 3) {
- clrmem_(&tabinf_1.lx5);
- }
- /*< if ((jord.ge.2).and.(method.ne.1)) call clrmem(lx4) >*/
- if (jord >= 2 && status_1.method != 1) {
- clrmem_(&tabinf_1.lx4);
- }
- /*< igoof=0 >*/
- flags_1.igoof = 0;
- /*< time=time-delta >*/
- status_1.time -= status_1.delta;
- /*< delta=delta/8.0d0 >*/
- status_1.delta /= 8.;
- /*< go to 620 >*/
- goto L620;
- /*< 610 delnew=delta >*/
- L610:
- delnew = status_1.delta;
- /*< if (numtp.eq.1) go to 630 >*/
- if (numtp == 1) {
- goto L630;
- }
- /*< call trunc(delnew) >*/
- trunc_(&delnew);
- /*< if (delnew.ge.(0.9d0*delta)) go to 630 >*/
- if (delnew >= status_1.delta * .9) {
- goto L630;
- }
- /*< time=time-delta >*/
- status_1.time -= status_1.delta;
- /*< delta=delnew >*/
- status_1.delta = delnew;
- /*< 620 numrtp=numrtp+1 >*/
- L620:
- ++numrtp;
- /*< ibkflg=0 >*/
- ibkflg = 0;
- /*< delold(1)=delta >*/
- status_1.delold[0] = status_1.delta;
- /*< if (delta.ge.delmin) go to 600 >*/
- if (status_1.delta >= delmin) {
- goto L600;
- }
- /*< time=time+delta >*/
- status_1.time += status_1.delta;
- /*< go to 900 >*/
- goto L900;
-
- /* determine order of integration method */
-
- /* ... skip if trapezoidal algorithm used */
- /*< 630 if ((method.eq.1).and.(iord.eq.2)) go to 650 >*/
- L630:
- if (status_1.method == 1 && status_1.iord == 2) {
- goto L650;
- }
- /*< if (numtp.eq.1) go to 650 >*/
- if (numtp == 1) {
- goto L650;
- }
- /*< ordrat=1.05d0 >*/
- ordrat = 1.05;
- /*< if (iord.gt.1) go to 635 >*/
- if (status_1.iord > 1) {
- goto L635;
- }
- /*< iord=2 >*/
- status_1.iord = 2;
- /*< call trunc(delnew) >*/
- trunc_(&delnew);
- /*< iord=1 >*/
- status_1.iord = 1;
- /*< if ((delnew/delta).le.ordrat) go to 650 >*/
- if (delnew / status_1.delta <= ordrat) {
- goto L650;
- }
- /*< if (maxord.le.1) go to 650 >*/
- if (status_1.maxord <= 1) {
- goto L650;
- }
- /*< iord=2 >*/
- status_1.iord = 2;
- /*< if (method.eq.1) go to 650 >*/
- if (status_1.method == 1) {
- goto L650;
- }
- /*< call getm8(lx4,nxtrm) >*/
- getm8_(&tabinf_1.lx4, &cirdat_1.nxtrm);
- /*< go to 650 >*/
- goto L650;
- /*< 635 if (iord.lt.maxord) go to 640 >*/
- L635:
- if (status_1.iord < status_1.maxord) {
- goto L640;
- }
- /*< iord=iord-1 >*/
- --status_1.iord;
- /*< call trunc(delnew) >*/
- trunc_(&delnew);
- /*< iord=iord+1 >*/
- ++status_1.iord;
- /*< if ((delnew/delta).le.ordrat) go to 650 >*/
- if (delnew / status_1.delta <= ordrat) {
- goto L650;
- }
- /*< go to 642 >*/
- goto L642;
- /*< 640 iord=iord-1 >*/
- L640:
- --status_1.iord;
- /*< call trunc(delnew) >*/
- trunc_(&delnew);
- /*< iord=iord+1 >*/
- ++status_1.iord;
- /*< if ((delnew/delta).le.ordrat) go to 645 >*/
- if (delnew / status_1.delta <= ordrat) {
- goto L645;
- }
- /*< 642 iord=iord-1 >*/
- L642:
- --status_1.iord;
- /*< if (iord.eq.1) call clrmem(lx4) >*/
- if (status_1.iord == 1) {
- clrmem_(&tabinf_1.lx4);
- }
- /*< if (iord.eq.2) call clrmem(lx5) >*/
- if (status_1.iord == 2) {
- clrmem_(&tabinf_1.lx5);
- }
- /*< if (iord.eq.3) call clrmem(lx6) >*/
- if (status_1.iord == 3) {
- clrmem_(&tabinf_1.lx6);
- }
- /*< if (iord.eq.4) call clrmem(lx7) >*/
- if (status_1.iord == 4) {
- clrmem_(&tabinf_1.lx7);
- }
- /*< go to 650 >*/
- goto L650;
- /*< 645 iord=iord+1 >*/
- L645:
- ++status_1.iord;
- /*< call trunc(delnew) >*/
- trunc_(&delnew);
- /*< iord=iord-1 >*/
- --status_1.iord;
- /*< if ((delnew/delta).le.ordrat) go to 650 >*/
- if (delnew / status_1.delta <= ordrat) {
- goto L650;
- }
- /*< iord=iord+1 >*/
- ++status_1.iord;
- /*< if (iord.eq.2) call getm8(lx4,nxtrm) >*/
- if (status_1.iord == 2) {
- getm8_(&tabinf_1.lx4, &cirdat_1.nxtrm);
- }
- /*< if (iord.eq.3) call getm8(lx5,nxtrm) >*/
- if (status_1.iord == 3) {
- getm8_(&tabinf_1.lx5, &cirdat_1.nxtrm);
- }
- /*< if (iord.eq.4) call getm8(lx6,nxtrm) >*/
- if (status_1.iord == 4) {
- getm8_(&tabinf_1.lx6, &cirdat_1.nxtrm);
- }
- /*< if (iord.eq.5) call getm8(lx7,nxtrm) >*/
- if (status_1.iord == 5) {
- getm8_(&tabinf_1.lx7, &cirdat_1.nxtrm);
- }
-
- /* store outputs */
-
- /*< 650 if ((time+delta).le.tstart) go to 685 >*/
- L650:
- if (status_1.time + status_1.delta <= tran_1.tstart) {
- goto L685;
- }
- /*< if ((numtp.eq.0).and.(nosolv.ne.0)) go to 685 >*/
- if (numtp == 0 && status_1.nosolv != 0) {
- goto L685;
- }
- /*< call extmem(loutpt,numout) >*/
- extmem_(&tabinf_1.loutpt, &numout);
- /*< loco=loutpt+icalc*numout >*/
- loco = tabinf_1.loutpt + status_1.icalc * numout;
- /*< icalc=icalc+1 >*/
- ++status_1.icalc;
- /*< value(loco+1)=time >*/
- blank_1.value[loco] = status_1.time;
- /*< loc=locate(42) >*/
- loc = cirdat_1.locate[41];
- /*< 670 if (loc.eq.0) go to 682 >*/
- L670:
- if (loc == 0) {
- goto L682;
- }
- /*< if (nodplc(loc+5).ne.0) go to 680 >*/
- if (nodplc[loc + 4] != 0) {
- goto L680;
- }
- /*< node1=nodplc(loc+2) >*/
- node1 = nodplc[loc + 1];
- /*< node2=nodplc(loc+3) >*/
- node2 = nodplc[loc + 2];
- /*< iseq=nodplc(loc+4) >*/
- tabinf_1.iseq = nodplc[loc + 3];
- /*< value(loco+iseq)=value(lvnim1+node1)-value(lvnim1+node2) >*/
- blank_1.value[loco + tabinf_1.iseq - 1] = blank_1.value[tabinf_1.lvnim1 +
- node1 - 1] - blank_1.value[tabinf_1.lvnim1 + node2 - 1];
- /*< loc=nodplc(loc) >*/
- loc = nodplc[loc - 1];
- /*< go to 670 >*/
- goto L670;
- /*< 680 iptr=nodplc(loc+2) >*/
- L680:
- iptr = nodplc[loc + 1];
- /*< iptr=nodplc(iptr+6) >*/
- iptr = nodplc[iptr + 5];
- /*< iseq=nodplc(loc+4) >*/
- tabinf_1.iseq = nodplc[loc + 3];
- /*< value(loco+iseq)=value(lvnim1+iptr) >*/
- blank_1.value[loco + tabinf_1.iseq - 1] = blank_1.value[tabinf_1.lvnim1 +
- iptr - 1];
- /*< loc=nodplc(loc) >*/
- loc = nodplc[loc - 1];
- /*< go to 670 >*/
- goto L670;
- /*< 682 if(ipostp.eq.0) go to 684 >*/
- L682:
- if (status_1.ipostp == 0) {
- goto L684;
- }
- /*< value(ibuff+1)=time >*/
- blank_1.value[ibuff] = status_1.time;
- /*< call copy8(value(lvnim1+2),value(ibuff+2),nunods-1) >*/
- i_1 = cirdat_1.nunods - 1;
- copy8_(&blank_1.value[tabinf_1.lvnim1 + 1], &blank_1.value[ibuff + 1], &
- i_1);
- /*< if(numcur.ne.0) call copy8(value(lvnim1+loccur+1), >*/
- /*< 1 value(ibuff+nunods+1),numcur) >*/
- if (numcur != 0) {
- copy8_(&blank_1.value[tabinf_1.lvnim1 + loccur], &blank_1.value[ibuff
- + cirdat_1.nunods], &numcur);
- }
- /*< call fwrite(value(ibuff+1),numpos) >*/
- fwrite_(&blank_1.value[ibuff], &numpos);
- /*< 684 continue >*/
- L684:
-
- /* update transmission line delay table */
-
- /*< 685 if (jelcnt(17).eq.0) go to 694 >*/
- L685:
- if (cirdat_1.jelcnt[16] == 0) {
- goto L694;
- }
- /*< call sizmem(ltd,ltdsiz) >*/
- sizmem_(&tabinf_1.ltd, <dsiz);
- /*< numtd=ltdsiz/ntlin >*/
- numtd = ltdsiz / cirdat_1.ntlin;
- /*< if (numtd.le.3) go to 689 >*/
- if (numtd <= 3) {
- goto L689;
- }
- /*< baktim=time-tdmax >*/
- baktim = status_1.time - tran_1.tdmax;
- /*< if (baktim.lt.0.0d0) go to 689 >*/
- if (baktim < 0.) {
- goto L689;
- }
- /*< lcntr=0 >*/
- lcntr = 0;
- /*< ltemp=ltd >*/
- ltemp = tabinf_1.ltd;
- /*< do 686 i=1,numtd >*/
- i_1 = numtd;
- for (i = 1; i <= i_1; ++i) {
- /*< if (value(ltemp+1).ge.baktim) go to 687 >*/
- if (blank_1.value[ltemp] >= baktim) {
- goto L687;
- }
- /*< ltemp=ltemp+ntlin >*/
- ltemp += cirdat_1.ntlin;
- /*< lcntr=lcntr+1 >*/
- ++lcntr;
- /*< 686 continue >*/
- /* L686: */
- }
- /*< go to 689 >*/
- goto L689;
- /*< 687 if (lcntr.le.2) go to 689 >*/
- L687:
- if (lcntr <= 2) {
- goto L689;
- }
- /*< lcntr=lcntr-2 >*/
- lcntr += -2;
- /*< nwords=lcntr*ntlin >*/
- nwords = lcntr * cirdat_1.ntlin;
- /*< ltemp=ltemp-ntlin-ntlin >*/
- ltemp = ltemp - cirdat_1.ntlin - cirdat_1.ntlin;
- /*< call copy8(value(ltemp+1),value(ltd+1),ltdsiz-nwords) >*/
- i_1 = ltdsiz - nwords;
- copy8_(&blank_1.value[ltemp], &blank_1.value[tabinf_1.ltd], &i_1);
- /*< call relmem(ltd,nwords) >*/
- relmem_(&tabinf_1.ltd, &nwords);
- /*< call sizmem(ltd,ltdsiz) >*/
- sizmem_(&tabinf_1.ltd, <dsiz);
- /*< 689 call extmem(ltd,ntlin) >*/
- L689:
- extmem_(&tabinf_1.ltd, &cirdat_1.ntlin);
- /*< ltdptr=ltd+ltdsiz >*/
- ltdptr = tabinf_1.ltd + ltdsiz;
- /*< value(ltdptr+1)=time >*/
- blank_1.value[ltdptr] = status_1.time;
- /*< loc=locate(17) >*/
- loc = cirdat_1.locate[16];
- /*< 690 if (loc.eq.0) go to 693 >*/
- L690:
- if (loc == 0) {
- goto L693;
- }
- /*< locv=nodplc(loc+1) >*/
- locv = nodplc[loc];
- /*< z0=value(locv+1) >*/
- z0 = blank_1.value[locv];
- /*< node1=nodplc(loc+2) >*/
- node1 = nodplc[loc + 1];
- /*< node2=nodplc(loc+3) >*/
- node2 = nodplc[loc + 2];
- /*< node3=nodplc(loc+4) >*/
- node3 = nodplc[loc + 3];
- /*< node4=nodplc(loc+5) >*/
- node4 = nodplc[loc + 4];
- /*< ibr1=nodplc(loc+8) >*/
- ibr1 = nodplc[loc + 7];
- /*< ibr2=nodplc(loc+9) >*/
- ibr2 = nodplc[loc + 8];
- /*< lspot=nodplc(loc+30)+ltdptr >*/
- lspot = nodplc[loc + 29] + ltdptr;
- /*< if ((initf.eq.5).and.(nosolv.ne.0)) go to 691 >*/
- if (status_1.initf == 5 && status_1.nosolv != 0) {
- goto L691;
- }
- /*< value(lspot)=value(lvnim1+node3)-value(lvnim1+node4) >*/
- /*< 1 +value(lvnim1+ibr2)*z0 >*/
- blank_1.value[lspot - 1] = blank_1.value[tabinf_1.lvnim1 + node3 - 1] -
- blank_1.value[tabinf_1.lvnim1 + node4 - 1] + blank_1.value[
- tabinf_1.lvnim1 + ibr2 - 1] * z0;
- /*< value(lspot+1)=value(lvnim1+node1)-value(lvnim1+node2) >*/
- /*< 1 +value(lvnim1+ibr1)*z0 >*/
- blank_1.value[lspot] = blank_1.value[tabinf_1.lvnim1 + node1 - 1] -
- blank_1.value[tabinf_1.lvnim1 + node2 - 1] + blank_1.value[
- tabinf_1.lvnim1 + ibr1 - 1] * z0;
- /*< go to 692 >*/
- goto L692;
- /*< 691 value(lspot)=value(locv+7)+value(locv+8)*z0 >*/
- L691:
- blank_1.value[lspot - 1] = blank_1.value[locv + 6] + blank_1.value[locv +
- 7] * z0;
- /*< value(lspot+1)=value(locv+5)+value(locv+6)*z0 >*/
- blank_1.value[lspot] = blank_1.value[locv + 4] + blank_1.value[locv + 5] *
- z0;
- /*< 692 loc=nodplc(loc) >*/
- L692:
- loc = nodplc[loc - 1];
- /*< go to 690 >*/
- goto L690;
-
- /* add two *fake* backpoints to ltd for interpolation near time=0.0d0 */
-
- /*< 693 if (numtd.ne.0) go to 694 >*/
- L693:
- if (numtd != 0) {
- goto L694;
- }
- /*< call extmem(ltd,ntlin+ntlin) >*/
- i_1 = cirdat_1.ntlin + cirdat_1.ntlin;
- extmem_(&tabinf_1.ltd, &i_1);
- /*< call copy8(value(ltd+1),value(ltd+ntlin+1),ntlin) >*/
- copy8_(&blank_1.value[tabinf_1.ltd], &blank_1.value[tabinf_1.ltd +
- cirdat_1.ntlin], &cirdat_1.ntlin);
- /*< call copy8(value(ltd+1),value(ltd+2*ntlin+1),ntlin) >*/
- copy8_(&blank_1.value[tabinf_1.ltd], &blank_1.value[tabinf_1.ltd + (
- cirdat_1.ntlin << 1)], &cirdat_1.ntlin);
- /*< value(ltd+2*ntlin+1)=time >*/
- blank_1.value[tabinf_1.ltd + (cirdat_1.ntlin << 1)] = status_1.time;
- /*< value(ltd+ntlin+1)=time-delta >*/
- blank_1.value[tabinf_1.ltd + cirdat_1.ntlin] = status_1.time -
- status_1.delta;
- /*< value(ltd+1)=time-delta-delta >*/
- blank_1.value[tabinf_1.ltd] = status_1.time - status_1.delta -
- status_1.delta;
-
- /* rotate state vector storage */
-
- /* .. time-point accepted */
- /*< 694 call copy8(delold(1),delold(2),6) >*/
- L694:
- copy8_(status_1.delold, &status_1.delold[1], &c__6);
- /*< delta=delnew >*/
- status_1.delta = delnew;
- /*< delold(1)=delta >*/
- status_1.delold[0] = status_1.delta;
- /*< go to (710,706,702,698,696,696), iord >*/
- switch (status_1.iord) {
- case 1: goto L710;
- case 2: goto L706;
- case 3: goto L702;
- case 4: goto L698;
- case 5: goto L696;
- case 6: goto L696;
- }
- /*< 696 call ptrmem(lx7,itemp) >*/
- L696:
- ptrmem_(&tabinf_1.lx7, &itemp);
- /*< call ptrmem(lx6,lx7) >*/
- ptrmem_(&tabinf_1.lx6, &tabinf_1.lx7);
- /*< go to 700 >*/
- goto L700;
- /*< 698 call ptrmem(lx6,itemp) >*/
- L698:
- ptrmem_(&tabinf_1.lx6, &itemp);
- /*< 700 call ptrmem(lx5,lx6) >*/
- L700:
- ptrmem_(&tabinf_1.lx5, &tabinf_1.lx6);
- /*< go to 704 >*/
- goto L704;
- /*< 702 call ptrmem(lx5,itemp) >*/
- L702:
- ptrmem_(&tabinf_1.lx5, &itemp);
- /*< 704 call ptrmem(lx4,lx5) >*/
- L704:
- ptrmem_(&tabinf_1.lx4, &tabinf_1.lx5);
- /*< go to 708 >*/
- goto L708;
- /*< 706 if (method.eq.1) go to 710 >*/
- L706:
- if (status_1.method == 1) {
- goto L710;
- }
- /*< call ptrmem(lx4,itemp) >*/
- ptrmem_(&tabinf_1.lx4, &itemp);
- /*< 708 call ptrmem(lx3,lx4) >*/
- L708:
- ptrmem_(&tabinf_1.lx3, &tabinf_1.lx4);
- /*< go to 713 >*/
- goto L713;
- /*< 710 if(nolx3.eq.0) go to 712 >*/
- L710:
- if (nolx3 == 0) {
- goto L712;
- }
- /*< if(nolx2.eq.0) go to 711 >*/
- if (nolx2 == 0) {
- goto L711;
- }
- /*< call ptrmem(lx1,itemp) >*/
- ptrmem_(&tabinf_1.lx1, &itemp);
- /*< go to 714 >*/
- goto L714;
- /*< 711 call ptrmem(lx2,itemp) >*/
- L711:
- ptrmem_(&tabinf_1.lx2, &itemp);
- /*< call ptrmem(lx1,lx2) >*/
- ptrmem_(&tabinf_1.lx1, &tabinf_1.lx2);
- /*< go to 714 >*/
- goto L714;
- /*< 712 call ptrmem(lx3,itemp) >*/
- L712:
- ptrmem_(&tabinf_1.lx3, &itemp);
- /*< 713 call ptrmem(lx2,lx3) >*/
- L713:
- ptrmem_(&tabinf_1.lx2, &tabinf_1.lx3);
- /*< call ptrmem(lx1,lx2) >*/
- ptrmem_(&tabinf_1.lx1, &tabinf_1.lx2);
- /*< 714 call ptrmem(lx0,lx1) >*/
- L714:
- ptrmem_(&tabinf_1.lx0, &tabinf_1.lx1);
- /*< call ptrmem(itemp,lx0) >*/
- ptrmem_(&itemp, &tabinf_1.lx0);
-
- /* check breakpoints */
-
- /*< 750 if (ibkflg.eq.0) go to 760 >*/
- /* L750: */
- if (ibkflg == 0) {
- goto L760;
- }
- /* .. just accepted analysis at breakpoint */
- /*< jord=iord >*/
- jord = status_1.iord;
- /*< iord=1 >*/
- status_1.iord = 1;
- /*< if (jord.ge.5) call clrmem(lx7) >*/
- if (jord >= 5) {
- clrmem_(&tabinf_1.lx7);
- }
- /*< if (jord.ge.4) call clrmem(lx6) >*/
- if (jord >= 4) {
- clrmem_(&tabinf_1.lx6);
- }
- /*< if (jord.ge.3) call clrmem(lx5) >*/
- if (jord >= 3) {
- clrmem_(&tabinf_1.lx5);
- }
- /*< if ((jord.ge.2).and.(method.ne.1)) call clrmem(lx4) >*/
- if (jord >= 2 && status_1.method != 1) {
- clrmem_(&tabinf_1.lx4);
- }
- /*< ibkflg=0 >*/
- ibkflg = 0;
- /*< nbkpt=nbkpt+1 >*/
- ++nbkpt;
- /*< if (nbkpt.gt.numbkp) go to 950 >*/
- if (nbkpt > tabinf_1.numbkp) {
- goto L950;
- }
- /*< temp=dmin1(delbkp,value(lsbkpt+nbkpt)-time) >*/
- /* Computing MAX */
- d_1 = delbkp, d_2 = blank_1.value[tabinf_1.lsbkpt + nbkpt - 1] -
- status_1.time;
- temp = min(d_2,d_1);
- /*< delta=dmin1(delta,0.1d0*temp,delmax) >*/
- /* Computing MAX */
- d_1 = status_1.delta, d_2 = temp * .1, d_1 = min(d_2,d_1);
- status_1.delta = min(tran_1.delmax,d_1);
- /*< if (numtp.eq.0) delta=delta/10.0d0 >*/
- if (numtp == 0) {
- status_1.delta /= 10.;
- }
- /*< delold(1)=delta >*/
- status_1.delold[0] = status_1.delta;
- /*< go to 600 >*/
- goto L600;
- /*< 760 del1=value(lsbkpt+nbkpt)-time >*/
- L760:
- del1 = blank_1.value[tabinf_1.lsbkpt + nbkpt - 1] - status_1.time;
- /*< if ((1.01d0*delta).le.del1) go to 600 >*/
- if (status_1.delta * 1.01 <= del1) {
- goto L600;
- }
- /*< ibkflg=1 >*/
- ibkflg = 1;
- /*< delbkp=delta >*/
- delbkp = status_1.delta;
- /*< delta=del1 >*/
- status_1.delta = del1;
- /*< delold(1)=delta >*/
- status_1.delold[0] = status_1.delta;
- /*< go to 600 >*/
- goto L600;
-
- /* transient analysis failed */
-
- /*< 900 write (iofile,901) >*/
- L900:
- io__85.ciunit = status_1.iofile;
- s_wsfe(&io__85);
- e_wsfe();
- /*< 901 format('1*error*: internal timestep too small in transient analys >*/
- /*< 1is'/) >*/
- /*< go to 910 >*/
- goto L910;
- /*< 905 write (iofile,906) itl5 >*/
- L905:
- io__86.ciunit = status_1.iofile;
- s_wsfe(&io__86);
- do_fio(&c__1, (char *)&flags_1.itl5, (ftnlen)sizeof(integer));
- e_wsfe();
- /*< 906 format('1*error*: transient analysis iterations exceed limit of ' >*/
- /*< 1,i5,/'0this limit may be overridden using the itl5 parameter on th >*/
- /*< 2e .option card') >*/
- /*< 910 write (iofile,911) time,delta,numnit >*/
- L910:
- io__87.ciunit = status_1.iofile;
- s_wsfe(&io__87);
- do_fio(&c__1, (char *)&status_1.time, (ftnlen)sizeof(doublereal));
- do_fio(&c__1, (char *)&status_1.delta, (ftnlen)sizeof(doublereal));
- do_fio(&c__1, (char *)&numnit, (ftnlen)sizeof(integer));
- e_wsfe();
- /*< 911 format(1h0,10x,'time = ',1pd12.5,'; delta = ',d12.5,'; numnit = >*/
- /*< 1',i6/) >*/
- /*< write (iofile,916) >*/
- io__88.ciunit = status_1.iofile;
- s_wsfe(&io__88);
- e_wsfe();
- /*< 916 format(1h0/'0last node voltages:'/) >*/
- /*< write (iofile,avhdr) (anode,avltg,i=1,nvprln) >*/
- io__89.ciunit = status_1.iofile;
- s_wsfe(&io__89);
- i_1 = nvprln;
- for (i = 1; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&anode, (ftnlen)sizeof(doublereal));
- do_fio(&c__1, (char *)&avltg, (ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< write (iofile,avfrm) (lprn,nodplc(junode+i),value(lvnim1+i), >*/
- /*< 1 i=2,ncnods) >*/
- io__90.ciunit = status_1.iofile;
- s_wsfe(&io__90);
- i_1 = cirdat_1.ncnods;
- for (i = 2; i <= i_1; ++i) {
- do_fio(&c__1, (char *)&lprn, (ftnlen)sizeof(integer));
- do_fio(&c__1, (char *)&nodplc[tabinf_1.junode + i - 1], (ftnlen)
- sizeof(integer));
- do_fio(&c__1, (char *)&blank_1.value[tabinf_1.lvnim1 + i - 1], (
- ftnlen)sizeof(doublereal));
- }
- e_wsfe();
- /*< go to 930 >*/
- goto L930;
- /*< 920 write (iofile,921) time >*/
- L920:
- io__91.ciunit = status_1.iofile;
- s_wsfe(&io__91);
- do_fio(&c__1, (char *)&status_1.time, (ftnlen)sizeof(doublereal));
- e_wsfe();
- /*< 921 format('0*error*: cpu time limit exceeded in transient analysis ' >*/
- /*< 1 ,'at time = ',1pd13.6/) >*/
- /*< 930 nogo=1 >*/
- L930:
- flags_1.nogo = 1;
-
- /* finished with transient analysis */
-
- /*< 950 rstats(10)=rstats(10)+numnit >*/
- L950:
- miscel_1.rstats[9] += numnit;
- /*< rstats(30)=rstats(30)+numtp >*/
- miscel_1.rstats[29] += numtp;
- /*< rstats(31)=rstats(31)+numrtp >*/
- miscel_1.rstats[30] += numrtp;
- /*< rstats(32)=rstats(32)+numnit >*/
- miscel_1.rstats[31] += numnit;
- /*< if(ipostp.eq.0) go to 1000 >*/
- if (status_1.ipostp == 0) {
- goto L1000;
- }
- /*< if (ipostp.ne.0) call clsraw >*/
- if (status_1.ipostp != 0) {
- clsraw_();
- }
-
- /* return unneeded memory */
-
- /*< 1000 if (mode.eq.2) go to 1010 >*/
- L1000:
- if (status_1.mode == 2) {
- goto L1010;
- }
- /*< if (modedc.ne.3) go to 1100 >*/
- if (status_1.modedc != 3) {
- goto L1100;
- }
- /*< 1010 call clrmem(lvnim1) >*/
- L1010:
- clrmem_(&tabinf_1.lvnim1);
- /*< call clrmem(lx0) >*/
- clrmem_(&tabinf_1.lx0);
- /*< call clrmem(lvn) >*/
- clrmem_(&tabinf_1.lvn);
- /*< call clrmem(lx1) >*/
- clrmem_(&tabinf_1.lx1);
- /*< if (memptr(macins)) call clrmem(macins) >*/
- if (memptr_(&tabinf_1.macins)) {
- clrmem_(&tabinf_1.macins);
- }
- /*< if(nolx2.eq.0) call clrmem(lx2) >*/
- if (nolx2 == 0) {
- clrmem_(&tabinf_1.lx2);
- }
- /*< call clrmem(lvntmp) >*/
- clrmem_(&tabinf_1.lvntmp);
- /*< if ((mode.eq.1).and.(modedc.eq.3)) go to 1020 >*/
- if (status_1.mode == 1 && status_1.modedc == 3) {
- goto L1020;
- }
- /*< if(nolx3.eq.0) call clrmem(lx3) >*/
- if (nolx3 == 0) {
- clrmem_(&tabinf_1.lx3);
- }
- /*< if (mode.eq.1) go to 1020 >*/
- if (status_1.mode == 1) {
- goto L1020;
- }
- /*< call clrmem(ltd) >*/
- clrmem_(&tabinf_1.ltd);
- /*< if (iord.eq.1) go to 1020 >*/
- if (status_1.iord == 1) {
- goto L1020;
- }
- /*< if (method.eq.1) go to 1020 >*/
- if (status_1.method == 1) {
- goto L1020;
- }
- /*< call clrmem(lx4) >*/
- clrmem_(&tabinf_1.lx4);
- /*< if (iord.eq.2) go to 1020 >*/
- if (status_1.iord == 2) {
- goto L1020;
- }
- /*< call clrmem(lx5) >*/
- clrmem_(&tabinf_1.lx5);
- /*< if (iord.eq.3) go to 1020 >*/
- if (status_1.iord == 3) {
- goto L1020;
- }
- /*< call clrmem(lx6) >*/
- clrmem_(&tabinf_1.lx6);
- /*< if (iord.eq.4) go to 1020 >*/
- if (status_1.iord == 4) {
- goto L1020;
- }
- /*< call clrmem(lx7) >*/
- clrmem_(&tabinf_1.lx7);
- /*< 1020 call extmem(loutpt,2*numout) >*/
- L1020:
- i_1 = numout << 1;
- extmem_(&tabinf_1.loutpt, &i_1);
- /*< 1100 if(ipostp.ne.0) call clrmem(ibuff) >*/
- L1100:
- if (status_1.ipostp != 0) {
- clrmem_(&ibuff);
- }
- /*< call second(t2) >*/
- second_(&t2);
- /*< rstats(loctim)=rstats(loctim)+t2-t1 >*/
- miscel_1.rstats[loctim - 1] = miscel_1.rstats[loctim - 1] + t2 - t1;
- /*< return >*/
- return 0;
- /*< end >*/
- } /* dctran_ */
-
- #undef cvalue
- #undef nodplc
- #undef ablnk
- #undef lprn
- #undef subtit
- #undef avltg
- #undef anode
- #undef avfrm
- #undef avhdr
- #undef alett
- #undef aletr
-
-
-